{extend name="public/base"}

{block name="main"}
<body class="childrenBody">
<form id="wx_menu_form" method="post" action="{:url('save_menu')}">
<blockquote class="layui-elem-quote news_search">
    <div class="layui-inline">
        <a class="layui-btn layui-btn-normal add_menu add_level_one"><i class="layui-icon">&#xe654;</i>添加一级菜单</a>
        <button type="submit" class="layui-btn">保存</button>
        <a class="layui-btn sync-menu" style="background-color:#5FB878">同步菜单</a>
    </div>
</blockquote>
<div class="layui-form links_list">
    <table class="layui-table">
        <colgroup>
            <col width="50">
            <col width="30%">
            <col width="20%">
            <col>
        </colgroup>
        <thead>
        <tr>
            <th></th>
            <th style="text-align:left;">菜单名称</th>
            <th>菜单类型</th>
            <th>菜单内容</th>
        </tr>
        </thead>
        <tbody class="links_content">
            {volist name="data" id="vo"}
            <tr data-index="{$vo.index}" data-two-index="{$vo.two_index}">
                <td><i class="layui-icon">&#xe600;</i></td>
                <td>
                    <input type="text" class="layui-input" name="name[{$vo.index}][{$vo.two_index}]" value="{$vo.name}" style=" width:230px; font-size: 8px; float: left; {gt name='vo.two_index' value='0'} margin-left: 2em; {/gt}">
                    <p style="float: left; margin-left: 5px; margin-bottom: 0;">
                        {eq name='vo.two_index' value='0'}
                        <a class="layui-btn  add_menu"><i class="layui-icon">&#xe654;</i> 添加</a>
                        {/eq}
                        <a class="layui-btn  layui-btn-danger del_menu"><i class="layui-icon">&#xe640;</i> 删除</a>
                    </p>
                </td>
                <td>
                    <div class="form-group" style=" margin-bottom: 0">
                        <select class="form-control m-b" name="account[{$vo.index}][{$vo.two_index}]" style="height: 23px; padding: 0 12px; font-size: 8px; margin: 0; ">
                            <option value="view" {eq name="vo.account" value="view"} selected {/eq}>链接</option>
                            <option value="click" {eq name="vo.account" value="click"} selected {/eq}>触发关键字</option>
                            <option value="scancode_push" {eq name="vo.account" value="scancode_push"} selected {/eq}>扫码</option>
                            <option value="scancode_waitmsg" {eq name="vo.account" value="scancode_waitmsg"} selected {/eq}> 扫码（等待信息）</option>
                            <option value="pic_sysphoto" {eq name="vo.account" value="pic_sysphoto"} selected {/eq}>系统拍照发图</option>
                            <option value="pic_photo_or_album" {eq name="vo.account" value="pic_photo_or_album"} selected {/eq}>拍照或者相册发图</option>
                            <option value="pic_weixin" {eq name="vo.account" value="pic_weixin"} selected {/eq}>微信相册发图</option>
                            <option value="location_select" {eq name="vo.account" value="location_select"} selected {/eq}>地理位置</option>
                        </select>
                    </div>
                </td>
                <td>
                    <input type="text" class="layui-input" name="value[{$vo.index}][{$vo.two_index}]" value="{$vo.value}" style="font-size: 8px; width: 100%;">
                </td>
            </tr>
            {/volist}
        </tbody>
    </table>
</div>

</form>
</body>
{/block}

{block name="javascript"}
<script type="text/javascript" src="__STATIC__/admin/js/wechat.js"></script>
{/block}